<script type="text/javascript" src="http://jwebsocket.googlecode.com/svn-history/r1820/branches/jWebSocket-1.0/jWebSocketClient/web/res/js/jWebSocket.js"></script>
<script type="text/javascript"> 

// jws.browserSupportsWebSockets checks if web sockets are available
// either natively, by the FlashBridge or by the ChromeFrame.
if( jws.browserSupportsWebSockets() ) {
  jWebSocketClient = new jws.jWebSocketJSONClient();
  // Optionally enable GUI controls here
} else {
  // Optionally disable GUI controls here
  var lMsg = jws.MSG_WS_NOT_SUPPORTED;
  alert( lMsg );
}

var lURL = 'ws://main:8787';

//log( "Connecting to " + lURL + " and logging in as NO..." );
var lRes = jWebSocketClient.logon( lURL, '', '', {
  // OnOpen callback
  OnOpen: function( aEvent ) {
    //log( "<font style='color:#888'>jWebSocket connection established.</font>" );
  },
  // OnMessage callback
  OnMessage: function( aEvent, aToken ) {
    //log( "<font style='color:#888'>jWebSocket '" + aToken.type + "' token received, full message: '" + aEvent.data + "'</font>" );
  },
  // OnClose callback
  OnClose: function( aEvent ) {
    //log( "<font style='color:#888'>jWebSocket connection closed.</font>" );
  }
});

</script>